package ScalaStudy.chapter06

object Test04_ClassForAccess {

}

//定义一个父类
class Person{
  private var idCord:String = "12345"              //私有的身份证号
  protected var name:String = "wq"                 //受保护的姓名
  var sex:String = "female"                        //公开的性别
  private [chapter06] var age: Int = 27            //指定包的年龄

  def printInfo: Unit ={
    println(s"person: ${idCord} ${name} ${sex} ${age}")
  }
}